<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<link href="style/style.css" rel="stylesheet" type="text/css">
<link href="style/global.css" rel="stylesheet" type="text/css"><script type="text/javascript" src="<%=basePath%>/js/global.js"></script>
<jsp:include page="/extInclude.jsp" />

<!--如用到jquery jbox必须引入 -->
<jsp:include page="/jqueryInclude.jsp" />
<style>
.x-tree-node-cb{
	display: none;
}
</style>
<script type="text/javascript">
Ext.onReady(function(){
var deptTree = new Ext.tree.TreePanel({
                    id : 'treePanels',
                    title : '按部门分类 ',
                    iconCls:'dep-user',
                    loader : new Ext.tree.TreeLoader({
                                url : _ctxPath + '/genDeptTree.do'
                            }),
                    root : new Ext.tree.AsyncTreeNode({
                                nodeType : 'async',
                                text:'本级单位',
                                id : 34000000,
                                expanded : true
                            }),
                    autoScroll:true,
                    rootVisible : true,
                    listeners : {
                        'click' : function(node,e){
                            document.getElementById('deptid').value=node.id;
                            document.getElementById('deptname').value=node.text;
                            document.getElementById('ifr').src='listUser.do?dept.id='+node.id+'&dept.bmmc='+node.text;
                        }
                    }
                });
                
                var contactPanel = new Ext.Panel({
                    id : 'contactPanel',
                    renderTo:'dep-tree',
                    autoWidth : true,
                    height:450,
                    layout : 'border',
                    border : false,
                    items : [{ 
                                region : 'west',
                                split : true,
                                collapsible : true,
                                width : 200,
                                margins : '5 0 5 5',
                                layout : 'accordion',
                                autoScroll:true,
                                items : deptTree
                            }, {
                                 border : false,
                                region : 'center',
                                margins : '5 0 5 5',
                                width : 400,
                                height:450,
                                html:"<iframe id='ifr' src='listUser.do' width='100%' height='450' frameborder='0' marginwidth='0' marginheight='0'></iframe>"
                            }]
                });
})
</script>
<input type=hidden id='deptid' />
<input type=hidden id='deptname' />
<input type=hidden id='user.ygxm' />
<input type=hidden id='user.ygzh' />
<div class="rightCon" align="center">
	<div class="rightTitle" align="left">
		<h3>
			<s:property value="nav" escape="false"/>
		</h3>
	</div>
	<table class="listTable">
		<tr class="listTitle">
			<td align="left">
				<div id="dep-tree"></div>
			</td>
		</tr>
	</table>
</div>
